package com.ruoyi.common.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 客户类型
 *
 * @author 杨森
 */
public enum CustomerType {
    INTENDEDCUSTOMERS("INTENDEDCUSTOMERS","意向客户"),
    CONTRACTEDCUSTOMERS("CONTRACTEDCUSTOMERS","签约客户")
    ;
    private String CustomerTypeCode;
    private String CustomerTypeMessage;

    public String getCustomerTypeCode() {
        return CustomerTypeCode;
    }

    public void setCustomerTypeCode(String customerTypeCode) {
        CustomerTypeCode = customerTypeCode;
    }

    public String getCustomerTypeMessage() {
        return CustomerTypeMessage;
    }

    public void setCustomerTypeMessage(String customerTypeMessage) {
        CustomerTypeMessage = customerTypeMessage;
    }

    CustomerType(String customerTypeCode, String customerTypeMessage) {
        CustomerTypeCode = customerTypeCode;
        CustomerTypeMessage = customerTypeMessage;
    }


    /**
     * 转为数据
     *
     * @return 枚举对象数组
     */
    public static CustomerType getByCode(String CustomerTypeCode) {

        for (CustomerType item : CustomerType.values()) {
            if (CustomerTypeCode.equals(item.getCustomerTypeCode())){
                return item;
            }
        }
        return null;
    }


}
